package com.springboot.demo.design.pattern.listen;

import com.springboot.demo.design.pattern.Order;
import org.springframework.stereotype.Component;

/**
 * 更新订单监听器
 *
 * @author supu
 * @date 2019-07-02 14:28
 **/
@Component
public class UpdateOrderListener<T extends ListenerContext> implements Listener<T> {
    @Override
    public void listen(T context) {
        Order order = (Order)context.getData();
        System.out.println("update order is process, order= " + order);
    }
}
